From 43c5c358f0d94471f22b830ad9b804bda21d1c80 Mon Sep 17 00:00:00 2001 From: "josht@us.ibm.com" Date: Tue, 23 Aug 2005 00:28:50 +0100 Subject: [PATCH] Add a newline to the fscanf format string used to parse /proc/net/dev entries, to avoid an additional read and bad-entry-skip just to eat the newline. --- tools/xenstat/libxenstat/src/xenstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c index e37ba9c25a..85ffc0872d 100644 --- a/tools/xenstat/libxenstat/src/xenstat.c +++ b/tools/xenstat/libxenstat/src/xenstat.c @@ -505,7 +505,7 @@ static int xenstat_collect_networks(xenstat_handle * handle, unsigned int domid; int ret = fscanf(handle->procnetdev, "vif%u.%u:%llu%llu%llu%llu%*u%*u%*u%*u" - "%llu%llu%llu%llu%*u%*u%*u%*u", + "%llu%llu%llu%llu%*u%*u%*u%*u\n", &domid, &net.id, &net.tbytes, &net.tpackets, &net.terrs, &net.tdrop, -- 2.30.2